import request from '@/utils/request'

// 查询国家机构列表
export function listAll(query) {
  return request({
    url: '/his/allHos/list',
    method: 'get',
    params: query
  })
}
export function getDeviceId(channelId) {
  return request({
    url: `/his/department/getDeviceId/`+channelId,
    method: 'get'
  });
}

// export function getDeviceId(query) {
//   return request({
//     url: '/his/department/getDeviceId',
//     method: 'get',
//     params: query
//   })
// }
export function getDepartmentInfo(query){
  return request({
    url: '/his/department/getDepartmentInfo',
    method: 'get',
    params: query
  })
}

//4.9 查询机构信息 通过两种方式
export function listTowHos(query) {
  return request({
    url: '/his/allHos/listTowHos',
    method: 'get',
    params: query
  })
}

// 查询国家机构列表
export function importTemplate(query) {
  return request({
    url: '/his/allHos/importTemplate',
    method: 'get',
    params: query
  })
}


// 查询国家机构详细
export function getAll(uniqueCode) {
  return request({
    url: '/his/allHos/' + uniqueCode,
    method: 'get'
  })
}

// 新增国家机构
export function addAll(data) {
  return request({
    url: '/his/allHos',
    method: 'post',
    data: data
  })
}

// 修改国家机构
export function updateAll(data) {
  return request({
    url: '/his/allHos',
    method: 'put',
    data: data
  })
}
export function updateEnableds(data) {
  return request({
    url: '/his/allHos/updateEnableds',
    method: 'put',
    data: data
  })
}

// 删除国家机构
export function delAll(uniqueCode) {
  return request({
    url: '/his/allHos/' + uniqueCode,
    method: 'delete'
  })
}

export function getHospitalData(query){
  return request({
    url: '/his/allHos/listByNum',
    method: 'get',
    params: query
  })
}


export function getHospitalData1(query){
  return request({
    // url: '/his/allHos/listByNum',
	url: '/his/allHos/listByHid',
    method: 'get',
    params: query
  })
}

// 导出国家机构
export function exportAll(query) {
  return request({
    url: '/his/allHos/export',
    method: 'get',
    params: query
  })
}
